home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 390 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.th-darmstadt.de!news
  2. From: Enno Sandner <enno@intellektik.informatik.th-darmstadt.de>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Question about destructor...
  5. Date: Thu, 04 Jan 1996 09:42:06 +0100
  6. Organization: Fachbereich Informatik, TH Darmstadt
  7. Message-ID: <30EB92DE.41C67EA6@intellektik.informatik.th-darmstadt.de>
  8. References: <4ce9mk$atg@eng_ser1.erg.cuhk.hk>
  9. NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b3 (X11; I; SunOS 4.1.3 sun4m)
  14.  
  15. Marty McFly wrote:
  16. >         I now have 2 classes A and B.  B is a derived class of A.  However,
  17. > the internal implementation of A is not known, i.e., the private members of
  18. > class A are not provided, only the public members are given.  But class B is
  19. > implemented by myself.  So what should be written in the destructor of B so
  20. > that all the private members inherited from A are also "deleted"?
  21.  
  22. You don't need to write any extra code. When a B-instance gets
  23. destructed the B and the A destructor are both called.
  24.  
  25.     Enno
  26.